package com.tarena.lbs.content.pojo.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.elasticsearch.annotations.Setting;

import java.util.Date;

@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@TableName("lbs_article")
@Setting(shards = 1, replicas = 0)
public class ArticlePO {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("article_title")
    private String articleTitle;  //文章标题

    @TableField("article_category_id")
    private Integer articleCategoryId;  //文章分类id

    @TableField("article_label")
    private String articleLabel; //文章标签

    @TableField("article_digest")
    private String articleDigest;  //文章摘要

    @TableField("article_cover")
    private String articleCover;   //文章封面

    @TableField("article_pic")
    private String articlePic;  //文章主图

    @TableField("article_detail")
    private String articleDetail;  //文章详情

    @TableField("shop_id")
    private Integer shopId;     //店铺Id店铺Id

    //活动标语  吐血大甩卖 冬季打折 全场8折 es内置有一些分词器 standard simple
    @TableField("activity_word")
    private String activityWord;    //活动引流标语

    @TableField("activity_id")
    private Integer activityId;  //活动ID

    @TableField("latitude")
    private String latitude;  //纬度


    //private String location; //经度、维度，逗号隔开  注意：这里假设location是GeoPoint类型

    @TableField("longitude")
    private String longitude;   //经度

    @TableField("article_status")
    private Integer articleStatus;  //文章状态 0下线 1上线

//    // 映射字段---category_status
//    @TableField("online")
//    private Integer online; // 上下线  0上线，1下线

    @TableField("status")
    private Integer status;

    @TableField("access_count")
    private Integer accessCount;  //访问数量

    @TableField("like_count")
    private Integer likeCount;   //点赞数量

    @TableField("favorite_count")
    private Integer favoriteCount;  //收藏数量

    @TableField("user_id")
    private Integer userId;   //文章的发布者

    @TableField("user_name")
    private String userName;  //文章发布者名字

    @TableField("source")
    private Integer source;  //文章涞源

    //创建时间
    @TableField("create_time")
    private Date createTime;

    @TableField("update_time")
    private Date updateTime;

}
